<?php

include "../../lib/start.php";

check_session();
check_permission(ADM_PERM);

$sel_alunni = "SELECT id_alunno, cognome, nome, classe FROM alunni WHERE id_classe = ".$_REQUEST['id_classe']." ORDER BY cognome, nome";
$res_alunni = $db->execute($sel_alunni);

$sel_classi = "SELECT CONCAT_WS(' ', anno_corso, sezione) AS classe, id_classe FROM classi ORDER BY sezione, classe";
$res_classi = $db->executeQuery($sel_classi);

$sel_desc = "SELECT anno_corso, sezione FROM classi WHERE id_classe = ".$_REQUEST['id_classe'];
$res_desc = $db->executeQuery($sel_desc);
$_desc = $res_desc->fetch_assoc();
$desc = $_desc['classe'].$_desc['sezione'];

include "alunni.html.php";

?>